#pragma config(Hubs,  S1, HTMotor,  HTMotor,  HTMotor,  HTServo)
#pragma config(Sensor, S2,     Sonic,          sensorSONAR)
#pragma config(Sensor, S3,     HTGYRO,         sensorSONAR)
#pragma config(Sensor, S4,     HTSMUX,         sensorI2CCustom)
#pragma config(Motor,  motorA,           ,             tmotorNXT, openLoop)
#pragma config(Motor,  motorB,           ,             tmotorNXT, openLoop)
#pragma config(Motor,  motorC,           ,             tmotorNXT, openLoop)
#pragma config(Motor,  mtr_S1_C1_1,     Front,         tmotorTetrix, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C1_2,     Right,         tmotorTetrix, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C2_1,     Rear,          tmotorTetrix, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C2_2,     Left,          tmotorTetrix, PIDControl, encoder)
#pragma config(Motor,  mtr_S1_C3_1,     Sweeper,       tmotorTetrix, openLoop)
#pragma config(Motor,  mtr_S1_C3_2,     Redirect,      tmotorTetrix, openLoop)
#pragma config(Servo,  srvo_S1_C4_1,    Hook,                 tServoStandard)
#pragma config(Servo,  srvo_S1_C4_2,    Hook2,                tServoStandard)
#pragma config(Servo,  srvo_S1_C4_3,    SpringRelease,        tServoStandard)
#pragma config(Servo,  srvo_S1_C4_4,    servo4,               tServoNone)
#pragma config(Servo,  srvo_S1_C4_5,    servo5,               tServoNone)
#pragma config(Servo,  srvo_S1_C4_6,    servo6,               tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

#include "JoystickDriver.c"  //Include file to "handle" the Bluetooth messages.
#include "AutonomousHeaderDice.h"

task main()
{
	initializeRobot();

	moveOffRamp(40);
	wait10Msec(10);
	rotateCWGyro(30, 45);//Rotates CCW to make hitting the kickstand easier

	moveToGoals();
	getMovingGoal();
	//rotateCCWGyro(30, -45);
	moveToKickstand();
}
